import service from '@/request/index';


// 获取checkout列表
export const checkoutList = () => {
    return service({
        url: '/checkout',
        method: 'get',
    })
}

// 提交订单
export const confirm = (data) => {
    return service({
        url: '/checkout/confirm',
        method: 'post',
        data: JSON.stringify(data)
    })
}

// 订单支付
export const pay = (orderId, data) => {
    return service({
        url: `/orders/pay/${orderId}`,
        method: 'post',
        data: JSON.stringify(data)
    })
}